package com.yangyouqi.posthorse.core.repository;

import com.yangyouqi.posthorse.core.domain.Customer;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @author 杨友奇
 * @Time 2018/6/5
 */
public interface CustomerRepository extends JpaRepository<Customer,Long> {
    /**
     * 查询用户，返回为布尔类型
     */
    public Boolean existsByUsername(String userName);

    /**
     * 查询账户密码
     */

    public Customer findByUsernameAndPassword(String username, String password);

    public List<Customer> findByType(Integer type);


}
